Skip to content

Add memray profiler for k8s Python services#650

Open
ChrisLovering wants to merge 3 commits into
mainfrom
add-memray-profiler
Open

Add memray profiler for k8s Python services#650
ChrisLovering wants to merge 3 commits into
mainfrom
add-memray-profiler

Conversation

@ChrisLovering
Copy link
Copy Markdown
Member

Reusable tool for profiling memory usage of running Python services in k8s. Uses ephemeral containers + sys.remote_exec to attach memray to a target process without restarting it.

python -m kubernetes.scripts.memray_profile deploy/king-arthur -n bots

Injects an ephemeral container, uses sys.remote_exec to attach a
memray.Tracker to the target process, and copies the report back.
@ChrisLovering ChrisLovering requested a review from jb3 as a code owner May 2, 2026 18:55
@python-discord-policy-bot python-discord-policy-bot Bot requested a review from a team May 2, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group: kubernetes Issues and pull requests related to the Kubernetes setup

Projects

Status: Up next

Development

Successfully merging this pull request may close these issues.

1 participant